import { createBrowserRouter } from "react-router-dom";

import Home from '../pages/home/Index'
import Index from '../pages/index/Index'
import App from "../App";
// 3.利用react-router-dom库对项目中的素材页面进行路由配置，实现不同页面之间的导航切换
export const tworouter=[
    {
        path:'/home',
        element:<Home></Home>,
        title:'首页'
    },
    {
        path:'/index',
        element:<Index></Index>,
        title:'订单'
    }
]

export const router=createBrowserRouter([
    {
        path:'/',
        element:<App></App>,
        children:tworouter
    }
])

export default router